package com.iss.supermarket.util.repository;

import com.iss.supermarket.util.List.ListModelArray;
import com.iss.supermarket.util.entity.Detailed;
import com.iss.supermarket.util.entity.Goods;
import com.iss.supermarket.util.entity.TradeInfo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository("TradeDao")
public interface TradeDao {
    Goods queryGoodsInfo(@Param("BarCode")String BarCode);

//    void UpdateDetailed(@Param("gd_bar_code")String gd_bar_code,
//                         @Param("tr_uuid")String tr_uuid,
//                         @Param("tr")String gd_borad_name,
//                         @Param("dt_gd_num")int dt_gd_num,
//                         @Param("dt_gd_price")String dt_gd_price,
//                         @Param("modtime")String modetime);

    void InsertDetailed(@Param("gd_bar_code")String gd_bar_code,
                        @Param("tr_uuid")String tr_uuid,
                        @Param("gd_broad_name")String gd_broad_name,
                        @Param("dt_gd_num")int dt_gd_num,
                        @Param("dt_gd_price")String dt_gd_price,
                        @Param("modtime")String modetime);

//    void UpdateTradeInfo(@Param("tr_uuid")String tr_uuid,
//                         @Param("nice_name")String nice_name,
//                         @Param("tr_total_num")int tr_total_num,
//                         @Param("tr_total_amount")String tr_total_amount,
//                         @Param("modtime")String modtime
//                         );

    void InsertTradeInfo(@Param("tr_uuid")String tr_uuid,
                         @Param("nice_name")String nice_name,
                         @Param("tr_total_num")int tr_total_num,
                         @Param("tr_total_amount")String tr_total_amount,
                         @Param("modtime")String modtime
    );

    void ReturnGoods(@Param("gd_bar_code")String gd_bar_code,
                     @Param("tr_uuid")String tr_uuid,
                     @Param("gd_broad_name")String gd_broad_name,
                     @Param("dt_gd_num")int dt_gd_num,
                     @Param("dt_gd_price")String dt_gd_price,
                     @Param("modtime")String modetime);

    Detailed queryDetailedInfoByUUID(@Param("uuid")String uuid);
}
